<?php

/**
 * 关系
 */
namespace app\voip\func;


use app\voip\model\ECorrelation;

class CorrelationFunc
{

    /**
     * @param $data
     * @return array|false
     * @throws \Exception
     */
    static public function addAll($data)
    {
        $obj=new ECorrelation();
        return $obj->saveAll($data);
    }

    /**
     * @param $pid
     * @param $cid
     * @return ECorrelation|null
     * @throws \think\exception\DbException
     */
    static public function getPCInfo($pid, $cid)
    {
        return ECorrelation::get(['pid'=>$pid,'cid'=>$cid]);
    }
}